{% extends 'index.html' %}

{% block title %}
<title>图书列表</title>
{% endblock %}

<!--列表内容页-->
{% block con %}
<div class="row">
    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
        <div class="widget am-cf">
            <div class="widget-head am-cf">
                <div class="widget-title  am-cf">图书列表</div>
            </div>
            <div class="widget-body  am-fr">

                <div class="am-u-sm-12 am-u-md-6 am-u-lg-6">
                    <div class="am-form-group">
                        <div class="am-btn-toolbar">
                            <div class="am-btn-group am-btn-group-xs">
                        <button type="button" class="am-btn am-btn-default am-btn-success"><span class="am-icon-plus"></span>
                            <a href="{{ url_for('admin.books_add')}}">新增</a></button>
                            <!--抓取-->
                                <a href=""></a>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="am-u-sm-12 am-u-md-6 am-u-lg-3">
                    <div class="am-form-group tpl-table-list-select">
                        <select data-am-selected="{btnSize: 'sm'}" style="display: none;">
                          <option value="option1">所有类别</option>
                          <option value="option2">IT业界</option>
                          <option value="option3">数码产品</option>
                          <option value="option3">笔记本电脑</option>
                          <option value="option3">平板电脑</option>
                          <option value="option3">只能手机</option>
                          <option value="option3">超极本</option>
                        </select>
                    </div>
                </div>
                <div class="am-u-sm-12 am-u-md-12 am-u-lg-3">
                    <div class="am-input-group am-input-group-sm tpl-form-border-form cl-p">
                        <input type="text" class="am-form-field ">
                        <span class="am-input-group-btn">
                            <button class="am-btn  am-btn-default am-btn-success tpl-table-list-field am-icon-search" type="button"></button>
                          </span>
                    </div>
                </div>

                <div class="am-u-sm-12">
                    <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black ">
                        <thead>
                            <tr>
                                <th>ID</th>
                                <th>封面图</th>
                                <th>书名</th>
                                <th>作者</th>
                                <th>价格</th>
                                <th>出版社</th>
                                <th>出版日期</th>
                                <th>书号</th>
                                <th>数量</th>
                                <th>状态</th>
                                <th>录入时间</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                        {% for v in books%}
                            <tr>
                                <td class="am-text-middle">{{ v.id }}</td>
                                <td>
                                    <img src="/static/uploads/{{ v.pic_url }}" class="tpl-table-line-img" alt="">
                                </td>
                                <td class="am-text-middle">{{ v.title }}</td>
                                <td class="am-text-middle">{{ v.author }}</td>
                                <td class="am-text-middle">{{ v.price }}</td>
                                <td class="am-text-middle">{{ v.publisher }}</td>
                                <td class="am-text-middle">{{ v.pubdate }}</td>
                                <td class="am-text-middle">{{ v.isbn13 }}</td>
                                <td class="am-text-middle">{{ v.num }}</td>
                                <td class="am-text-middle">
                                    {% if v.status == 0 %}
                                        正常
                                    {% else %}
                                        下架
                                    {% endif %}
                                </td>
                                <td class="am-text-middle">{{ v.addtime }}</td>

                                <td class="am-text-middle">
                                    <div class="tpl-table-black-operation">
                                        <a href="javascript:;">
                                            <i class="am-icon-pencil"></i> 编辑
                                        </a>
                                        <a href="javascript:;" class="tpl-table-black-operation-del">
                                            <i class="am-icon-trash"></i> 删除
                                        </a>
                                    </div>
                                </td>
                            </tr>
                        {% endfor %}
                            <!-- more data -->
                        </tbody>
                    </table>
                </div>
                <div class="am-u-lg-12 am-cf">

                    <div class="am-fr">
                        <ul class="am-pagination tpl-pagination">
                            <li class="am-disabled"><a href="#">«</a></li>
                            <li class="am-active"><a href="#">1</a></li>
                            <li><a href="#">2</a></li>
                            <li><a href="#">3</a></li>
                            <li><a href="#">4</a></li>
                            <li><a href="#">5</a></li>
                            <li><a href="#">»</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

{% endblock %}
